package org.vehicle.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.vehicle.dao.OrganizationInfoMapper;
import org.vehicle.entity.DataRecordInfo;
import org.vehicle.entity.OrganizationInfo;
import org.vehicle.service.OrganizationInfoService;
import org.vehicle.service.base.BaseServiceImpl;

@Service
public class OrganizationInfoServiceImpl extends BaseServiceImpl<OrganizationInfo, Long> implements OrganizationInfoService{
	@Autowired
	private OrganizationInfoMapper organizationInfoMapper;
	
	@Override
	public List<String> findOrganizationInfoByVehicleInfoId(Long vehicleInfoId) {
		
		return organizationInfoMapper.findOrganizationInfoByVehicleInfoId(vehicleInfoId);
	}

	@Override
	public List<OrganizationInfo> findCheckOrganizationInfoList() {
		
		return organizationInfoMapper.findCheckOrganizationInfoList();
	}

	@Override
	public Map<String, Object> getOrganizationInfoListList(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		List<OrganizationInfo> organizationInfoList = organizationInfoMapper.getOrganizationInfoListList(paramMap);
    	Integer count = organizationInfoMapper.getOrganizationInfoCount(paramMap);
    	//分页数据
    	Map<String, Object> dataMap = new HashMap<String, Object>();
    	dataMap.put("totalCount", count);
    	dataMap.put("list", organizationInfoList);
    	dataMap.put("currentPage", paramMap.get("currentPage"));
    	return dataMap;
	}

	@Override
	public List<OrganizationInfo> getAllOrganizationInfoExceptRoot() {
		return organizationInfoMapper.getAllOrganizationInfoExceptRoot();
	}

	@Override
	public OrganizationInfo getOrganizationInfoByName(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return organizationInfoMapper.getOrganizationInfoByName(paramMap);
	}

}